<template>
	<div class="login-container">
		<div class="box-item login-intro">
			<h1>{{ $t('app.title') }}</h1>
			<div class="desc">
				{{ $t('app.description') }}
			</div>
			<div class="login-bg"><img src="@/assets/logo.png" alt="" /></div>
		</div>
		<div class="box-item login-form">
			<div class="login-title">
				账号登陆
				<!--				<el-button link :class="loginType === 'account' ? 'account' : ''" @click="loginSwitch('account')">{{ $t('app.signIn') }}</el-button>
				<el-button link :class="loginType === 'mobile' ? 'account' : ''" @click="loginSwitch('mobile')">{{ $t('app.mobileSignIn') }}</el-button>-->
			</div>
			<account />
			<!--			<account v-if="loginType === 'account'" />-->
			<!--			<mobile v-if="loginType === 'mobile'" />-->
			<!--			<third />-->
		</div>
	</div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import Account from './account.vue'
// import Mobile from './mobile.vue'
// import Third from './third.vue'

// 登录类型
const loginType = ref('account')
const loginSwitch = (type: string) => {
	loginType.value = type
}
</script>

<style lang="scss" scoped>
.login-container {
	display: flex;
	justify-content: center;
	background: url('@/assets/login-bg.png') no-repeat center;
	background-size: cover;
	align-items: center;
	height: 100vh;
}
.box-item {
	width: 444px;
	height: 570px;
}
.login-intro {
	background: #003b94;
	border-radius: 12px 0 0 12px;
	box-shadow: 0 16px 73px 8px rgba(203, 203, 203, 0.2);
	display: flex;
	flex-direction: column;
	width: 500px;
	//flex: 0 1 auto;
}
.login-intro h1 {
	margin-top: 20px;
	text-align: center;
	color: white;
}
.login-intro .desc {
	color: white;
	line-height: 32px;
	text-align: justify;
	padding: 15px 20px 5px 20px;
	font-size: 18px;
	font-family: 'Microsoft YaHei', sans-serif;
}
.login-bg {
	display: flex;
	justify-content: center;
}
.login-bg img {
	width: 300px;
}
.login-title {
	/*	display: flex;
	justify-content: space-around;
	margin-bottom: 20px;
	:deep(.el-button) {
		font-size: 20px;
		color: #333;
		padding-bottom: 8px;
	}
	.account {
		color: var(--el-color-primary);
		border-bottom: 4px solid var(--el-color-primary) !important;
	}*/
	font-size: 30px;
	font-weight: 700;
	text-align: center;
	color: #1e1e1e;
	margin-bottom: 80px;
}
.login-form {
	background: #ffffff;
	border-radius: 0 12px 12px 0;
	padding: 34px 42px;
	position: relative;
	border: solid 1px #efefef;
	//flex: 0 1 auto;
	box-shadow: 1px 1px 8px #aaa6a6;
	box-sizing: border-box;
	width: 440px;

	:deep(.el-input) {
		height: 45px;
		margin-top: 5px;
		.el-input__inner {
			padding: 10px 15px 10px 5px;
			height: 45px;
			line-height: 45px;
			color: #666;
			font-size: 16px;
		}
	}
}

@media only screen and (max-width: 992px) {
	.login-intro {
		display: none;
	}
}
@media only screen and (max-width: 768px) {
	.login-container {
		background: #fff;
	}
	.login-intro {
		display: none;
	}
	.login-form {
		flex: 0 1 auto;
		border-radius: 0;
		box-shadow: none;
	}
	.login-captcha {
		:deep(.el-input) {
			width: 150px;
		}
	}
}
</style>
